<template>
  <div>
    <el-carousel type="card" :interval="4000" height="250px" class="swiper">
      <el-carousel-item v-for="(item, index) in banner" :key="index">
        <img v-lazy="item.imageUrl" alt="" />
      </el-carousel-item>
    </el-carousel>
  </div>
</template>
<script>
export default {
  name: 'Swiper',
  props: {
    //banner组件需要的数据props
    banner: {
      type: Array,
      default () {
        //默认props 推荐使用函数写法
        return []
      }
    }
  }
}
</script>
